// +FHDR------------------------------------------------------------
//                 Copyright (c) 2023 NOVAUTO.
//                       ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename      : delay_dffr.v
// Author        : ICer
// Created On    : 2023-12-28 17:56
// Last Modified : 2023-12-28 18:02 by ICer
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------


module delay_dffr #(
    //parameter
    parameter WIDTH = 1,
    parameter VALUE = {WIDTH{1'b0}}
)( /*AUTOARG*/
   // Outputs
   q,
   // Inputs
   clk, rst_n, d
   );

// ----------------------------------------------------------------
// Interface declare
// ----------------------------------------------------------------
input clk;
input rst_n;

input [WIDTH -1:0]d;
output reg[WIDTH -1:0]q;

// ----------------------------------------------------------------
// Wire declare
// ----------------------------------------------------------------

// ----------------------------------------------------------------
// AUTO declare
// ----------------------------------------------------------------
/*AUTOOUTPUT*/
/*AUTOINPUT*/
/*AUTOWIRE*/

always @(posedge clk or negedge rst_n) begin
  if(!rst_n) begin
    q <= VALUE; 
  end
  else begin
    q <= d;
  end
end

endmodule
// Local Variables:
// verilog-auto-inst-param-value:t
// verilog-library-directories:(".")
// verilog-library-extensions:(".v")
// End:

